Skip to content

ci(release): bake ui/dist into tagged commit so go install ships UI#97

Merged
aksOps merged 1 commit intomainfrom
fix/release-bake-ui-dist
May 4, 2026
Merged

ci(release): bake ui/dist into tagged commit so go install ships UI#97
aksOps merged 1 commit intomainfrom
fix/release-bake-ui-dist

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 4, 2026

Summary

  • Today's release workflow tags main HEAD. main's tree gitignores every file under ui/dist/ except a placeholder index.html, so go install github.com/RandomCodeSpace/docsiq@vX.Y.Z resolves a tree that embeds an empty UI — the binary 404s on every /assets/* request.
  • This PR makes the release: job download the ui-dist artifact, create an ephemeral commit on a detached HEAD with ui/dist/ force-added past .gitignore, then tag that commit as $TAG and push only the tag.
  • main itself is never modified — only the new tag is pushed to origin. proxy.golang.org sees the tagged tree (with embedded UI), so go install ...@vX.Y.Z produces a working binary.
  • Prebuilt signed release binaries are unaffected — CI already runs npm run build before go build.

Why this approach

Two alternatives considered and rejected:

  1. Commit ui/dist/ to main. Bloats every PR diff with hashed bundle changes; couples source-of-truth to build output. Closed as PR fix(build): commit ui/dist/ so go install ships a working web UI #96.
  2. Don't embed UI; ship a separate --ui-dir flag. Breaks the single-binary distribution promise.

Tagging an off-main commit keeps main clean and gives go install a tree it can actually use.

Test plan

  • Dispatch release.yml with bump=patch to cut v0.1.5
  • Workflow succeeds end-to-end (UI build, binary build, sign, tag, release)
  • git ls-tree v0.1.5 -- ui/dist/ lists index.html AND assets/*.js, assets/*.css
  • git ls-tree origin/main -- ui/dist/ still shows only index.html (main untouched)
  • Fresh GOPATH=/tmp/gopath GOFLAGS='-tags=sqlite_fts5' go install github.com/RandomCodeSpace/docsiq@v0.1.5 produces a binary
  • docsiq serve --port 37792 from that binary returns HTTP 200 on GET / and on at least 4 /assets/<hash>.{js,css} paths
  • Prebuilt signed docsiq-v0.1.5-linux-amd64 still verifies via the cosign command in the release notes

🤖 Generated with Claude Code

Today the release workflow tags main HEAD. Main's tree gitignores every
file under ui/dist/ except a placeholder index.html, so a
`go install github.com/RandomCodeSpace/docsiq@vX.Y.Z` resolves a tree
that embeds an empty UI — the binary 404s on every /assets/* request.

Fix: in the release: job, after binaries are signed but before the tag
is pushed, download the ui-dist artifact, force-add ui/dist/ on a
detached HEAD, commit it, then tag that ephemeral commit as $TAG and
push only the tag. Main itself is never modified — only the new tag is
pushed to origin. proxy.golang.org sees the tagged tree (with embedded
UI), so `go install ...@vX.Y.Z` produces a working binary.

Prebuilt release binaries are unaffected (they already contained the UI
because CI runs `npm run build` before `go build`).
@aksOps aksOps enabled auto-merge (squash) May 4, 2026 04:41
@aksOps aksOps merged commit 6956e82 into main May 4, 2026
16 of 17 checks passed
@aksOps aksOps deleted the fix/release-bake-ui-dist branch May 4, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant